A conventional computer graphics system can display graphical images of objects on a display. The display includes a plurality of display elements, known as pixels, typically arranged in a grid. In order to display objects, the conventional computer graphics system typically breaks each object into a plurality of polygons. A conventional system then renders the polygons in a particular order. For a three-dimensional scene, the opaque polygons are generally rendered from front to back as measured from the viewing plane of the display. Translucent polygons are desired to be rendered from back to front. Similarly, a two-dimensional scene can be displayed. In such a case, polygons are rendered based on their layer. Shallower layers occlude deeper layers.
Each of the polygons includes mathematically defined edges. When rendering an image, the conventional system often renders diagonal lines or polygon edges that are not perfectly horizontal or vertical. Because each pixel has finite physical dimensions, edges which are not horizontal or vertical may appear jagged. For example, consider each pixel to be a square. A diagonal line or edge rendered using the square pixels will appear jagged, similar to a staircase. This effect is known as aliasing.
Implicit edges are edges that are visible in a graphical image, but that are not explicitly defined. For example, in a graphical image, objects may intersect each other. The intersection appears as an edge that is not explicitly defined. Implicit edges are due to differences in depth values of the polygons whose intersection forms the implicit edge. The depth value can include the distance from the viewing plane, a w value, or layer order. The depth values at the implicit edge, the intersection of the polygons, should be virtually identical. However, slight differences in depth values of the polygons from one pixel to the next dictate which polygon is visible at a selected pixel. Because of these slight differences in depth values, the polygon considered to be visible can change from pixel to pixel. This creates the implicit edge. Each pixel still has a finite area. As a result, the implicit edge is also subject to aliasing.
In order to reduce aliasing, conventional systems perform antialiasing. Antialiasing helps reduce the effect that the physical dimension of the pixels has on the appearance of objects being displayed. Diagonal lines and edges appear smoother. It would be desirable if the antialiasing performed is also capable of providing antialiasing for implicit edges.
Some conventional systems utilize conventional supersampling in order to perform antialiasing for implicit edges. Supersampling is typically performed for a portion of the display, called a tile, or the entire display at a time. Each pixel in the tile or display is considered to be an M.times.N matrix subpixels. Data for each polygon in the tile is evaluated at each subpixel. Thus, the depth value, color, texture, and other data for the polygon can differ in and is evaluated at each subpixel. Data for the subpixels in each pixel in the tile are combined to provide the data for each pixel in the tile. Because supersampling evaluates and combines depth values for subpixels, supersampling can help smooth out the staircasing effect on implicit edges. However, the system requires sufficient memory to retain data for the M.times.N subpixels in each pixel in a tile to perform supersampling. Therefore, a large amount of memory is required. It must also be ensured that there are not artifacts at the seams between tiles. This slows processing. Furthermore, much more data is processed for each pixel in the display. Supersampling is thus computation intensive and relatively slow.
Some conventional systems address some of the problems in supersampling by performing adaptive supersampling. Adaptive supersampling first identifies areas where supersampling may be desired, for example at an implicit edge. Once the area of an implicit edge is identified, supersampling is performed for a tile in the region of the implicit edge. In areas where there are no implicit edges, supersampling is not performed. Although adaptive supersampling improves processing speed by reducing the areas subjected to supersampling, a large amount of memory is still required.
Accordingly, what is needed is a system and method that is capable of providing antialiasing for implicit edges and which consumes less memory. The present invention addresses such a need.